home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # Copyright (c) 1986, 1990 by The Trustees of Columbia University in
- # the City of New York. Permission is granted to any individual or
- # institution to use, copy, or redistribute this software so long as it
- # is not sold for profit, provided this copyright notice is retained.
- #
- #
- # $Header: /f/src2/encore.bin/cucca/mm/tarring-it-up/RCS/mmversion,v 2.1 90/10/04 18:32:57 melissa Exp $
- #
- # A hack to get rcs-id's and version info for mm. A better way probably,
- # exists. Feel free to let us know.
- #
- # If no arguments are given, version information is given all of ./mm's
- # modules.
- # If one argument is given, version information for all modules of specified
- # executable or object file is displayed.
- # If two or more arguments are specified, the first argument is a regular
- # expression, and the remainder are executables or object files.
- #
-
- if [ $# = 1 ] && [ "$1" = "-h" ]; then
- echo "usage: $0 [ [ regexp ] executable ]"
- echo " $0 regexp executable ..."
- exit 0
- fi
- if [ $# = 0 ]; then
- module=ALL
- prog=mm
- elif [ $# = 1 ]; then
- module="ALL"
- prog=$1
- else
- module=$1
- shift
- prog=$@
- fi
-
- if [ "$module" = "ALL" ]; then
- /usr/ucb/strings $prog | egrep '^Columbia|^Compiled|\$Header' |\
- sed -e 's/^\$Header\: //' -e 's/Exp \$$//' | sort
- else
- /usr/ucb/strings $prog | egrep '^Columbia|^Compiled|\$Header' |\
- sed -e 's/^\$Header\: //' -e 's/Exp \$$//' | sort |\
- egrep "^Columbia|^Compiled|$module"
- fi
-
-